import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

void main() => runApp(const ElevatedButtonWidget());

class ElevatedButtonWidget extends StatelessWidget {
  const ElevatedButtonWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Flutter Demo",
      theme: ThemeData(
        primaryColor: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(title: const Text("Flutter UI 基础 Widget -- 按钮")),
        body: ElevatedButton(
          onPressed: () {
            if (kDebugMode) {
              print('onPressed');
            }
          },
          child: const Text('ElevatedButton'),
        ),
      ),
    );
  }
}
